#include "MKL25Z4.h"
#include "device/TSISensor.h"
#include "device/RGBLed.h"
#include "device/clock.h"

void delay(int ms)
{
    if (ms <= 0)
        ms = 1;
    ms *= 2000;
    for (int j = 0; j < ms; j++) {
    }
}

int main(void)
{
    /* disable COP */
    SIM_COPC = 0;

    // sys_clock_init();

    // TSISensor tsi;
    RGBLed led;

    while (1) {
        // led.setLedColor(tsi.flag(), tsi.flag2(), 0);
        led.setLedColor(255, 0, 0);
        delay(1000);
        led.setLedColor(0,255, 0);
        delay(1000);
        led.setLedColor(0,0,255);
        delay(1000);
    }

    return 0;
}
